<!DOCTYPE html>
<html class="client-nojs skin-theme-clientpref-os citizen-feature-autohide-navigation-clientpref-1 citizen-feature-image-dimming-clientpref-0 citizen-feature-pure-black-clientpref-0 citizen-feature-custom-font-size-clientpref-standard citizen-feature-custom-width-clientpref-standard citizen-feature-performance-mode-clientpref-1 citizen-header-position-left citizen-header-position-mobile-bottom" lang="en" dir="ltr"><head>
<meta charset="UTF-8">
<title>LXMF fields</title>
<script id="mwoffliner-jsConfigVars">
document.documentElement.classList.replace('client-nojs', 'client-js')
RLCONF = {"wgBreakFrames":false,"wgSeparatorTransformTable":["",""],"wgDigitTransformTable":["",""],"wgDefaultDateFormat":"dmy","wgMonthNames":["","January","February","March","April","May","June","July","August","September","October","November","December"],"wgCanonicalNamespace":"","wgCanonicalSpecialPageName":false,"wgNamespaceNumber":0,"wgPageName":"LXMF_fields","wgTitle":"LXMF fields","wgCurRevisionId":2506,"wgRevisionId":0,"wgArticleId":15,"wgIsArticle":true,"wgIsRedirect":false,"wgAction":"view","wgUserName":null,"wgUserGroups":["*"],"wgCategories":["LXMF"],"wgPageViewLanguage":"en","wgPageContentLanguage":"en","wgPageContentModel":"wikitext","wgRelevantPageName":"LXMF_fields","wgRelevantArticleId":15,"wgIsProbablyEditable":false,"wgRelevantPageIsProbablyEditable":false,"wgRestrictionEdit":[],"wgRestrictionMove":[],"wgNoticeProject":"all","wgConfirmEditCaptchaNeededForGenericEdit":false,"wgMFDisplayWikibaseDescriptions":{"search":false,"nearby":false,"watchlist":false,"tagline":false},"wgMediaViewerOnClick":true,"wgMediaViewerEnabledByDefault":true,"wgVisualEditor":{"pageLanguageCode":"en","pageLanguageDir":"ltr","pageVariantFallbacks":"en"},"zimRelativeFilePath":"./"}
RLSTATE = {"user.options":"loading","site.styles":"ready","noscript":"ready","skins.citizen.styles":"ready","skins.citizen.codex.styles":"ready","skins.citizen.icons":"ready","ext.pygments":"ready"}
RLPAGEMODULES = ["jquery","mediawiki.base","mediawiki.page.ready","ext.pygments.view"]
;(RLQ = window.RLQ || []).push(function () {
mw.config.set(RLCONF)
mw.loader.state(RLSTATE)
mw.loader.load(RLPAGEMODULES)
;(mw.loader.impl || mw.loader.implement)(function () {
return [
'user.options@12s5i',
function ($, jQuery, require, module) {
mw.user.tokens.set({ patrolToken: '+\\', watchToken: '+\\', csrfToken: '+\\' })
},
]
})
})
</script>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="icon" type="image/png" href="./_res_/favicon.png">
<link rel="canonical" href="https://reticulum.miraheze.org/wiki/LXMF_fields"> <link href="./_mw_/ext.pygments.css" rel="stylesheet" type="text/css">
<link href="./_mw_/skins.citizen.codex.styles.css" rel="stylesheet" type="text/css">
<link href="./_mw_/skins.citizen.icons.css" rel="stylesheet" type="text/css">
<link href="./_mw_/skins.citizen.styles.css" rel="stylesheet" type="text/css"> <script async="" src="./_mw_/startup.js"></script>
<meta name="ResourceLoaderDynamicStyles" content="">
<link rel="stylesheet" type="text/css" href="./_mw_/site.styles.css">
<noscript><link href="./_mw_/noscript.css" rel="stylesheet" type="text/css"/></noscript>
<link rel="stylesheet" type="text/css" href="./_res_/footer.css">
<script src="./_res_/script.js"></script>
</head>
<body class="mwoffliner-fallback mediawiki ltr sitedir-ltr mw-hide-empty-elt ns-0 ns-subject page-LXMF_fields rootpage-LXMF_fields skin-citizen action-view skin--responsive">
<div id="content" class="mw-body" role="main">
<a id="top"></a>
<h1 id="firstHeading" class="firstHeading mw-first-heading"><span class="mw-page-title-main">LXMF fields</span></h1>
<div id="bodyContent">
<div id="contentSub">
<div id="mw-content-subtitle"></div>
</div>
<div id="mw-content-text" class="mw-body-content mw-content-ltr" lang="en" dir="ltr"><div class="mw-content-ltr mw-parser-output" lang="en" dir="ltr"><p><i>This page is under heavy construction and may be outdated – most fields are considered experimental!</i>
</p><p>Common for all fields is that <a href="LXMF" title="LXMF">LXMF</a> handles binary packing before sending. All fields must be passed in the specified format, often as a <code>list</code> with specific fields. Internally, LXMF uses <a rel="nofollow" class="external text" href="https://msgpack.org/">MessagePack</a> to pack data, so it can be efficiently transferred over the air/wire by Reticulum.
</p>
<div class="mw-heading mw-heading2"><h2 id="Embedded_LXMs">Embedded LXMs</h2></div>
<p><i>Not yet fully implemented, and spec is likely to change.</i>
</p>
<table class="wikitable">
<tbody><tr>
<th>Constant
</th>
<th style="text-align: center;">Index
</th>
<th>Description
</th>
<th>Content
</th></tr>
<tr>
<td>FIELD_EMBEDDED_LXMS
</td>
<td>0x01
</td>
<td>
</td>
<td>
</td></tr></tbody></table>
<div class="mw-heading mw-heading2"><h2 id="Telemetry">Telemetry</h2></div>
<p><i>See the Sideband application source code for telemetry format info.</i>
</p>
<table class="wikitable">
<tbody><tr>
<th>Constant
</th>
<th style="text-align: center;">Index
</th>
<th>Description
</th>
<th>Content
</th></tr>
<tr>
<td>FIELD_TELEMETRY
</td>
<td>0x02
</td>
<td>Node telemetry, all enabled sensors
</td>
<td>
</td></tr></tbody></table>
<div class="mw-heading mw-heading2"><h2 id="Telemetry_stream">Telemetry stream</h2></div>
<p><i>See the Sideband application source code for telemetry format info.</i>
</p>
<table class="wikitable">
<tbody><tr>
<th>Constant
</th>
<th style="text-align: center;">Index
</th>
<th>Description
</th>
<th>Content
</th></tr>
<tr>
<td>FIELD_TELEMETRY_STREAM
</td>
<td>0x03
</td>
<td>Aggregated downstream telemetry for bulk transfer
</td>
<td>
</td></tr></tbody></table>
<div class="mw-heading mw-heading2"><h2 id="Appearance">Appearance</h2></div>
<table class="wikitable">
<tbody><tr>
<th>Constant
</th>
<th style="text-align: center;">Index
</th>
<th>Description
</th>
<th>Content
</th></tr>
<tr>
<td>LXMF.FIELD_ICON_APPEARANCE
</td>
<td style="text-align: center;">0x04
</td>
<td>Defines the icon that represents this node on the situation map.
</td>
<td><code>[string ICON, byte[3] FG_COLOR, byte[3] BG_COLOR]</code>
</td></tr></tbody></table>
<p>Icon is a string with the name of a Material symbol. <a rel="nofollow" class="external text" href="https://fonts.google.com/icons">Searchable list</a>
</p><p>FG/BG color is an RGB color code from 000000 to FFFFFF.
</p>
<div class="mw-heading mw-heading5"><h5 id="Example_code">Example code</h5></div>
<div class="mw-highlight mw-highlight-lang-python mw-content-ltr" dir="ltr"><pre><span></span><span class="c1"># Displays a yellow hiker on a blue background</span>
<span class="n">lxm_fields</span> <span class="o">=</span> <span class="p">{</span> <span class="n">LXMF</span><span class="o">.</span><span class="n">FIELD_ICON_APPEARANCE</span><span class="p">:</span> <span class="p">[</span><span class="s2">"hiking"</span><span class="p">,</span>\<span class="n">xff</span>\<span class="n">xff</span>\<span class="n">x00</span><span class="p">,</span>\<span class="n">x00</span>\<span class="n">x00</span>\<span class="n">xff</span><span class="p">]</span> <span class="p">}</span>
<span class="n">lxm</span> <span class="o">=</span> <span class="n">LXMF</span><span class="o">.</span><span class="n">LXMessage</span><span class="p">(</span><span class="n">dest</span><span class="p">,</span> <span class="n">source</span><span class="p">,</span> <span class="n">message_content</span><span class="p">,</span> <span class="n">desired_method</span><span class="o">=</span><span class="n">LXMF</span><span class="o">.</span><span class="n">LXMessage</span><span class="o">.</span><span class="n">DIRECT</span><span class="p">,</span> <span class="n">fields</span><span class="o">=</span><span class="n">lxm_fields</span><span class="p">)</span>
</pre></div>
<div class="mw-heading mw-heading2"><h2 id="File_attachment">File attachment</h2></div>
<table class="wikitable">
<tbody><tr>
<th>Constant
</th>
<th style="text-align: center;">Index
</th>
<th>Description
</th>
<th>Content
</th></tr>
<tr>
<td>FIELD_FILE_ATTACHMENTS
</td>
<td style="text-align: center;">0x05
</td>
<td>List of file attachments
</td>
<td>See example
</td></tr></tbody></table>
<div class="mw-heading mw-heading5"><h5 id="Example_code_2">Example code</h5></div>
<div class="mw-highlight mw-highlight-lang-python mw-content-ltr" dir="ltr"><pre><span></span><span class="c1"># Attach a file</span>
<span class="n">file_name</span> <span class="o">=</span> <span class="s2">"some_file.pdf"</span>
<span class="k">with</span> <span class="nb">open</span><span class="p">(</span><span class="n">file_name</span><span class="p">,</span> <span class="s2">"rb"</span><span class="p">)</span> <span class="k">as</span> <span class="n">att_file</span><span class="p">:</span>
<span class="n">file_attachment_1</span> <span class="o">=</span> <span class="p">[</span><span class="n">file_name</span><span class="p">,</span> <span class="n">att_file</span><span class="o">.</span><span class="n">read</span><span class="p">()]</span>
<span class="n">lxm_fields</span> <span class="o">=</span> <span class="p">{</span> <span class="n">LXMF</span><span class="o">.</span><span class="n">FIELD_FILE_ATTACHMENTS</span><span class="p">:</span> <span class="p">[</span><span class="n">file_attachment_1</span><span class="p">]</span> <span class="p">}</span>
<span class="n">lxm</span> <span class="o">=</span> <span class="n">LXMF</span><span class="o">.</span><span class="n">LXMessage</span><span class="p">(</span><span class="n">dest</span><span class="p">,</span> <span class="n">source</span><span class="p">,</span> <span class="n">message_content</span><span class="p">,</span> <span class="n">desired_method</span><span class="o">=</span><span class="n">LXMF</span><span class="o">.</span><span class="n">LXMessage</span><span class="o">.</span><span class="n">DIRECT</span><span class="p">,</span> <span class="n">fields</span><span class="o">=</span><span class="n">lxm_fields</span><span class="p">)</span>
</pre></div>
<div class="mw-heading mw-heading2"><h2 id="Image_attachment">Image attachment</h2></div>
<table class="wikitable">
<tbody><tr>
<th>Constant
</th>
<th style="text-align: center;">Index
</th>
<th>Description
</th>
<th>Content
</th></tr>
<tr>
<td>FIELD_IMAGE
</td>
<td style="text-align: center;">0x06
</td>
<td>Image container
</td>
<td>See example
</td></tr></tbody></table>
<div class="mw-highlight mw-highlight-lang-python mw-content-ltr" dir="ltr"><pre><span></span><span class="c1"># Include an image</span>
<span class="n">image</span> <span class="o">=</span> <span class="p">[</span><span class="s2">"webp"</span><span class="p">,</span> <span class="n">image_data</span><span class="p">]</span>
<span class="n">lxm_fields</span> <span class="o">=</span> <span class="p">{</span> <span class="n">LXMF</span><span class="o">.</span><span class="n">FIELD_IMAGE</span><span class="p">:</span> <span class="n">image</span> <span class="p">}</span>
<span class="n">lxm</span> <span class="o">=</span> <span class="n">LXMF</span><span class="o">.</span><span class="n">LXMessage</span><span class="p">(</span><span class="n">dest</span><span class="p">,</span> <span class="n">source</span><span class="p">,</span> <span class="n">message_content</span><span class="p">,</span> <span class="n">desired_method</span><span class="o">=</span><span class="n">LXMF</span><span class="o">.</span><span class="n">LXMessage</span><span class="o">.</span><span class="n">DIRECT</span><span class="p">,</span> <span class="n">fields</span><span class="o">=</span><span class="n">lxm_fields</span><span class="p">)</span>
</pre></div>
<div class="mw-heading mw-heading2"><h2 id="Audio_attachment">Audio attachment</h2></div>
<table class="wikitable">
<tbody><tr>
<th>Constant
</th>
<th style="text-align: center;">Index
</th>
<th>Description
</th>
<th>Content
</th></tr>
<tr>
<td>FIELD_AUDIO
</td>
<td style="text-align: center;">0x07
</td>
<td>Audio container for non-realtime purposes
</td>
<td>See example
</td></tr></tbody></table>
<p>See <a rel="nofollow" class="external free" href="https://github.com/markqvist/LXMF/blob/master/LXMF/LXMF.py">https://github.com/markqvist/LXMF/blob/master/LXMF/LXMF.py</a> for available audio modes.
</p>
<div class="mw-highlight mw-highlight-lang-python mw-content-ltr" dir="ltr"><pre><span></span><span class="c1"># Audio fields are a list with two entries of:</span>
<span class="c1"># - The audio mode in use, from one of the available modes</span>
<span class="c1"># - The audio data encoded according to the specified mode</span>
<span class="n">audio</span> <span class="o">=</span> <span class="p">[</span><span class="n">LXMF</span><span class="o">.</span><span class="n">AM_CODEC2_2400</span><span class="p">,</span> <span class="n">audio_data</span><span class="p">]</span>
<span class="n">lxm_fields</span> <span class="o">=</span> <span class="p">{</span> <span class="n">LXMF</span><span class="o">.</span><span class="n">FIELD_AUDIO</span><span class="p">:</span> <span class="n">audio</span> <span class="p">}</span>
<span class="n">lxm</span> <span class="o">=</span> <span class="n">LXMF</span><span class="o">.</span><span class="n">LXMessage</span><span class="p">(</span><span class="n">dest</span><span class="p">,</span> <span class="n">source</span><span class="p">,</span> <span class="n">message_content</span><span class="p">,</span> <span class="n">desired_method</span><span class="o">=</span><span class="n">LXMF</span><span class="o">.</span><span class="n">LXMessage</span><span class="o">.</span><span class="n">DIRECT</span><span class="p">,</span> <span class="n">fields</span><span class="o">=</span><span class="n">lxm_fields</span><span class="p">)</span>
</pre></div>
<div class="mw-heading mw-heading2"><h2 id="Thread">Thread</h2></div>
<p><i>Not yet fully implemented, and spec is likely to change.</i>
</p>
<table class="wikitable">
<tbody><tr>
<th>Constant
</th>
<th style="text-align: center;">Index
</th>
<th>Description
</th>
<th>Content
</th></tr>
<tr>
<td>FIELD_THREAD
</td>
<td>0x08
</td>
<td>
</td>
<td>
</td></tr></tbody></table>
<div class="mw-heading mw-heading2"><h2 id="Commands">Commands</h2></div>
<p><i>See the Sideband application source code for command/result format info.</i>
</p>
<table class="wikitable">
<tbody><tr>
<th>Constant
</th>
<th style="text-align: center;">Index
</th>
<th>Description
</th>
<th>Content
</th></tr>
<tr>
<td>FIELD_COMMANDS
</td>
<td>0x09
</td>
<td>Direct commands
</td>
<td>
</td></tr></tbody></table>
<p>Custom commands are sent in this field. Built in commands include: <code>Ping</code> <code>Echo</code> <code>Signal</code>
</p>
<div class="mw-heading mw-heading2"><h2 id="Results">Results</h2></div>
<p><i>See the Sideband application source code for command/result format info.</i>
</p>
<table class="wikitable">
<tbody><tr>
<th>Constant
</th>
<th style="text-align: center;">Index
</th>
<th>Description
</th>
<th>Content
</th></tr>
<tr>
<td>FIELD_RESULTS
</td>
<td>0x0A
</td>
<td>
</td>
<td>
</td></tr></tbody></table>
<div class="mw-heading mw-heading2"><h2 id="Group">Group</h2></div>
<p><i>Not yet fully implemented, and spec is likely to change.</i>
</p>
<table class="wikitable">
<tbody><tr>
<th>Constant
</th>
<th style="text-align: center;">Index
</th>
<th>Description
</th>
<th>Content
</th></tr>
<tr>
<td>FIELD_GROUP
</td>
<td>0x0B
</td>
<td>
</td>
<td>
</td></tr></tbody></table>
<div class="mw-heading mw-heading2"><h2 id="See_also">See also</h2></div>
<ul><li><a href="LXMF" title="LXMF">LXMF</a></li>
<li><a rel="nofollow" class="external text" href="https://github.com/markqvist/lxmf?tab=readme-ov-file#structure">Structure</a> in the repository's README</li></ul></div><div id="catlinks" class="catlinks" data-mw="interface"><div id="mw-normal-catlinks" class="mw-normal-catlinks">Category: <ul><li><a href="Category%3ALXMF" title="Category:LXMF">LXMF</a></li></ul></div></div><!--htdig_noindex--><div><div class="zim-footer">
This page is issued from <a class="external text" title="Last edited on 2026-07-28" href="https://reticulum.miraheze.org/wiki/?title=LXMF_fields&oldid=2506">Reticulum Community Wiki</a>. The text is available under Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) unless otherwise noted. Additional terms may apply for the media files.
</div>
</div><!--/htdig_noindex--></div>
</div>
</div>
</body></html>